{% extends "base.html" %}

{% block content %}
    <h1>文章详情</h1>
    <p>Title : {{ article.title }}</p>
    <p>Content : {{ article.content }}</p>
    <p>PubTime : {{ article.pub_time }}</p>
    <p>Attach : {{ article.attach }}</p>
    <p>Author : {{ article.author.name }}</p>

    <form action="/blog/update/" method="post">
        <table border="true" width="80%">
            <tr>
                <td>id</td>
                <td>
                    <input type="text" name="id" value="{{ article.id }}"/>
                </td>
            </tr>
            <tr>
                <td>title</td>
                <td>
                    <input type="text" name="title" value="{{ article.title }}"/>
                </td>
            </tr>
            <tr>
                <td>content</td>
                <td><textarea name="content" rows="5" cols="100">{{ article.content }}</textarea></td>
            </tr>
            <tr>
                <td>
                    author
                </td>
                <td><input name="author" type="text" value="{{ article.author.name }}"/>
                    <input name="authorId" type="hidden" value="{{ article.author.id }}"/>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" value="update"/>
                </td>
            </tr>

        </table>

    </form>


{% endblock %}
